

<div id="page" style="z-index: 850;">
    <?php echo form_open() ?>
    <div class="page-title">
        <div style="z-index: 830;" class="in">
            <div class="titlebar">	
                <h2>CONFIGS</h2>
            </div>
            <div class="button-area"><?php echo form_submit($input_submit) ?></div>
        </div>
    </div>
    <div class="content" style="z-index: 730;">

        <div id="tabs" style="z-index: 590;" class="ui-tabs ui-widget ui-widget-content ui-corner-all">

            <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
                <li class="ui-state-default ui-corner-top"><a href="#tab-general">General</a></li>
                <li class="ui-state-default ui-corner-top"><a href="#tab-local">Local</a></li>
                <li class="ui-state-default ui-corner-top"><a href="#tab-option">Option</a></li>
                <li class="ui-state-default ui-corner-top"><a href="#tab-image">Image</a></li>
                <li class="ui-state-default ui-corner-top"><a href="#tab-ftp">FTP</a></li>

            </ul>

            <div id="tab-general" style="z-index: 580;" class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide">
                <?php foreach ($tab_general as $tab) { ?>
                    <div class="st-form-line" style="z-index: 680;">	

                        <span class="st-labeltext"><?php echo $tab['label'] ?></span>	
                        <?php $func = 'form_' . $tab['type'] ?>
                        <?php if ($tab['type'] == 'radio' || $tab['type'] == 'checkbox') { ?>
                            <?php foreach ($tab['value'] as $input) { ?>
                                <?php echo $func($input) ?>
                                <?php echo form_label($input['label']) ?>
                            <?php } ?>
                        <?php } elseif ($tab['type'] == 'dropdown') { ?>
                            <?php foreach ($tab['value'] as $input) { ?>
                                <?php echo form_dropdown($input['name'],$input['options'],$input['selected'],$input['extra']) ?>
                            <?php } ?>
                        <?php } else { ?>
                            <?php echo $func($tab['value']) ?>
                        <?php } ?>

                        <div class="clear" style="z-index: 670;"></div>

                    </div>
                <?php } ?>
            </div>

            <div id="tab-local" style="z-index: 570;" class="ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide">
                <?php foreach ($tab_local as $tab) { ?>
                    <div class="st-form-line" style="z-index: 680;">	

                        <span class="st-labeltext"><?php echo $tab['label'] ?></span>	
                        <?php $func = 'form_' . $tab['type'] ?>
                        <?php if ($tab['type'] == 'radio' || $tab['type'] == 'checkbox') { ?>
                            <?php foreach ($tab['value'] as $input) { ?>
                                <?php echo $func($input) ?>
                                <?php echo form_label($input['label']) ?>
                            <?php } ?>
                        <?php } elseif ($tab['type'] == 'dropdown') { ?>
                            <?php foreach ($tab['value'] as $input) { ?>
                                <?php echo form_dropdown($input['name'],$input['options'],$input['selected'],$input['extra']) ?>
                            <?php } ?>
                        <?php } else { ?>
                            <?php echo $func($tab['value']) ?>
                        <?php } ?>

                        <div class="clear" style="z-index: 670;"></div>

                    </div>
                <?php } ?>
            </div>

            <div id="tab-option" style="z-index: 560;" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
                <?php foreach ($tab_option as $tab) { ?>
                    <div class="st-form-line" style="z-index: 680;">	

                        <span class="st-labeltext"><?php echo $tab['label'] ?></span>	
                        <?php $func = 'form_' . $tab['type'] ?>
                        <?php if ($tab['type'] == 'radio' || $tab['type'] == 'checkbox') { ?>
                            <?php foreach ($tab['value'] as $input) { ?>
                                <?php echo $func($input) ?>
                                <?php echo form_label($input['label']) ?>
                            <?php } ?>
                        <?php } elseif ($tab['type'] == 'dropdown') { ?>
                            <?php foreach ($tab['value'] as $input) { ?>
                                <?php echo form_dropdown($input['name'],$input['options'],$input['selected'],$input['extra']) ?>
                            <?php } ?>
                        <?php } else { ?>
                            <?php echo $func($tab['value']) ?>
                        <?php } ?>

                        <div class="clear" style="z-index: 670;"></div>

                    </div>
                <?php } ?>
            </div>
            <div id="tab-image" style="z-index: 560;" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
                <?php foreach ($tab_image as $tab) { ?>
                    <div class="st-form-line" style="z-index: 680;">	

                        <span class="st-labeltext"><?php echo $tab['label'] ?></span>	
                        <?php $func = 'form_' . $tab['type'] ?>
                        <?php if ($tab['type'] == 'radio' || $tab['type'] == 'checkbox') { ?>
                            <?php foreach ($tab['value'] as $input) { ?>
                                <?php echo $func($input) ?>
                                <?php echo form_label($input['label']) ?>
                            <?php } ?>
                        <?php } elseif ($tab['type'] == 'dropdown') { ?>
                            <?php foreach ($tab['value'] as $input) { ?>
                                <?php echo form_dropdown($input['name'],$input['options'],$input['selected'],$input['extra']) ?>
                            <?php } ?>
                        <?php } else { ?>
                            <?php echo $func($tab['value']) ?>
                        <?php } ?>

                        <div class="clear" style="z-index: 670;"></div>

                    </div>
                <?php } ?>
            </div>
            <div id="tab-ftp" style="z-index: 560;" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
                <?php foreach ($tab_ftp as $tab) { ?>
                    <div class="st-form-line" style="z-index: 680;">	

                        <span class="st-labeltext"><?php echo $tab['label'] ?></span>	
                        <?php $func = 'form_' . $tab['type'] ?>
                        <?php if ($tab['type'] == 'radio' || $tab['type'] == 'checkbox') { ?>
                            <?php foreach ($tab['value'] as $input) { ?>
                                <?php echo $func($input) ?>
                                <?php echo form_label($input['label']) ?>
                            <?php } ?>
                        <?php } elseif ($tab['type'] == 'dropdown') { ?>
                            <?php foreach ($tab['value'] as $input) { ?>
                                <?php echo form_dropdown($input['name'],$input['options'],$input['selected'],$input['extra']) ?>
                            <?php } ?>
                        <?php } else { ?>
                            <?php echo $func($tab['value']) ?>
                        <?php } ?>

                        <div class="clear" style="z-index: 670;"></div>

                    </div>
                <?php } ?>
            </div>

        </div>

    </div>
    <?php echo form_close() ?>
</div>

<!-- start tabs codes -->
<script type="text/javascript">
    $(function() {
        $( "#tabs" ).tabs();
    });
</script>